package com.own.business.level.business.service;

import com.own.business.level.business.model.ExpModel;
import com.own.business.level.entity.bo.LevelUserHistoryBo;
import com.own.business.level.entity.map.LevelUserHistoryMapVo;
import com.own.business.level.entity.po.LevelUser;
import com.own.business.level.entity.po.LevelUserHistory;
import com.own.business.level.entity.query.LevelUserHistoryQuery;
import com.own.business.level.entity.vo.LevelUserHistoryVo;
import com.own.component.common.base.service.BaseService;
import com.own.component.common.login.user.BaseLoginUser;

import java.util.List;

/**
 * LevelUserHistoryService
 *
 * @author chenxueli
 * @date 2022-07-25 10:43:00
 */
public interface LevelUserHistoryService extends BaseService<
        LevelUserHistory,
        LevelUserHistoryBo,
        LevelUserHistoryVo,
        LevelUserHistoryMapVo,
        LevelUserHistoryQuery
        > {

    /**
     * 添加流水信息
     *
     * @param userId    用户id
     * @param levelUser 用户经验信息
     * @param model     经验模型
     */
    void add(Long userId, LevelUser levelUser, ExpModel model);

    /**
     * 获取最新的数据信息
     *
     * @param userId 用户id
     * @param type   类型
     * @return 结果
     */
    LevelUserHistory last(Long userId, String type);

    /**
     * 获取历史经验信息
     *
     * @param loginUser 登录的用户信息
     * @return 历史经验信息
     */
    List<LevelUserHistory> list(BaseLoginUser loginUser);

}
